using micromsg;
using MicroMsg.Common.Utils;
using System;
namespace MicroMsg.Storage
{
	public class OpLogStorage : StorageTable<OpLog, int>
	{
		public OpLogStorage() : base((OpLog op) => op.nID)
		{
		}
		public void clear(int nMaxID)
		{
			base.method_6((OpLog o) => o.nID <= nMaxID);
		}
		public bool addObj(object object_0)
		{
			if (object_0 == null)
			{
				return false;
			}
			if (!CmdItemHelper.isOplog(object_0))
			{
				Log.smethod_5("storage", "error unknow op log " + object_0.GetType().get_Name());
				return false;
			}
			Log.smethod_5("storage", "add op log " + object_0.GetType().get_Name());
			return true;
		}
		public void dumpData()
		{
		}
		public void test()
		{
			ModChatRoomMember.Builder builder = ModChatRoomMember.CreateBuilder();
			builder.City = "china";
			builder.ContactType = 0u;
			builder.ImgFlag = 1u;
			builder.NickName = Util.toSKString("aa");
			this.addObj(builder.Build());
			this.addObj(KVStatOpLog.DefaultInstance);
		}
	}
}
